﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using CapaLogica;

namespace CapaPresentacion.Converters
{
    class CmbRelacionFamiliarToVisibilityConverter : System.Windows.Data.IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string valorseleccionado = value as string;

            if (valorseleccionado != new ParentescoLogica().ObtenerIdMadreTutora().ToString() && valorseleccionado != new ParentescoLogica().ObtenerIdPadreTutor().ToString() && valorseleccionado != null)
            {                
                    return Visibility.Visible;
            }
           else
               return Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}